package cn.itcast.servlet;

import cn.itcast.domain.User;
import cn.itcast.service.UserService;
import cn.itcast.service.impl.UserServiceImpl;
import org.junit.Test;

import java.util.List;

public class UserServlet {
    private UserService service = new UserServiceImpl();

    //1.查询所有用户信息
    @Test
    public void findAllUser(){
        List<User> users = service.findAll();
        System.out.println(users);
    }


    //2.添加用户
    @Test
    public void add(){

        User user = new User(4,"赵柳",16,"男",3000f);
        service.add(user);
    }


}
